<!--
 * @Author: your name
 * @Date: 2020-12-23 14:38:28
 * @LastEditTime: 2020-12-23 14:59:08
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \basiccss\xuanzeqi\jiegouchoose.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>结构选择器</title>
    <style>
        /*html中的元素是以父子级,兄弟关系存在的，后代选择器是指子元素后的元素,不是子元素而是后代元素*/
        /* main article h2{
            color: green;
        } */

        /*子元素选择器中选择子元素,不包括孙级以及下面的元素*/
        /* main article>h2{
            color: green;
        } */

        /*用于选择紧挨着的同级兄弟元素*/
        /* main article+h2{
            color: green;
        } */

        /*永远选择后面的所有的兄弟元素*/
        /* main article~*{
            color: green;
        } */

        

        


    </style>
</head>
<body>
    <main>
        <article>
            <h2 name="houdunren">houdunren.com</h2>
            <aside>
                <h2>houdunwang.com</h2>
            </aside>
        </article>
        <h2 name='hdcms.com'>hdcms.com</h2>
        <h1>后盾人</h1>
    </main>
</body>
</html>